A5Storage::DataContainer CopyItemTo Method

Syntax

.CopyItemTo as L (SourceItemName as C, TargetContainer as A5Storage::DataContainer, TargetItemName as C)

Arguments

SourceItemNameCharacter

The item to copy.

TargetContainerA5Storage::DataContainer

The destination storage container.

TargetItemNameCharacter

The name to give the item when saved in the destination Container.

Returns

ResultLogical

Returns .T. if the operation succeeds, otherwise .F. (see .CallResult for additional error information.)

Description

Copies one item in a container to another container.

Example

dim Container as A5Storage::DataContainer = null_value()
dim TargetContainer as A5Storage::DataContainer = null_value()

CallResult = A5Storage::DataContainer::Open(Container, "Provider='Disk';Container='c:\A5Webroot';")
? CallResult.Success
= .T.

CallResult = A5Storage::DataContainer::Open(TargetContainer, "Provider='Disk';Container='c:\A5Webroot2';")
? CallResult.Success 
= .T.

?Container.CopyItemTo("MySourcePath/MySourceObject", TargetContainer, "MyTargetPath/MyObject")
= .T.